﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WCSY.BLL;
using WCSY.MODEL;
using System.Data.SqlClient;

public partial class UserManagement_MainRoleUser : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack){
            string roleId = Request["roleId"];
            userListBind(roleId);
        
        }
    }

    public void userListBind(string roleId) {
        Mg_userManager userM = new Mg_userManager();
        if (roleId!=null && !roleId.Equals(""))
        {
            this.userListGridView.DataSource = userM.getUserByRole(roleId);
            this.userListGridView.DataBind();
        
        };
    }
}
